<!DOCTYPE html>
<html lang="en">

{% if session['phone'] %}

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>京峰教育python3期班作品：自动化运维</title>

    <!-- Bootstrap Core CSS -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/static/css/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/static/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="/static/css/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/static/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    {% block css %}
    {% endblock %}
    <style type="text/css">
        {% block style %}
        {% endblock %}
    </style>
    

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>
    <!-- 定义一张画布 -->
    <div id="wrapper">

        <!-- 左侧顶部开始 -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">JFEdu Python3 AOPS</a>
            </div>
            <!-- 左侧顶部结束 -->

            <ul class="nav navbar-top-links navbar-right">
                <!-- 右侧消息按钮开始 -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-messages">
                        <li>
                            <a href="#">
                                <div>
                                    <strong>装服务器</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                                </div>
                                <div>小明，给我装100台服务器...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>读取所有消息</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                    <!-- 右侧消息按钮结束 -->
                </li>
            
                <!-- 右侧用户按钮开始 -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a href="/user/info"><i class="fa fa-user fa-fw"></i> 审核用户</a>
                        <li class="divider"></li>
                        <li><a href="/user/logout"><i class="fa fa-sign-out fa-fw"></i> 注销</a>
                        </li>
                    </ul>
                    <!-- 右侧用户按钮开始 -->
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->

            <div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li class="sidebar-search">
                            <div class="input-group custom-search-form">
                                <input type="text" class="form-control" placeholder="Search...">
                                <span class="input-group-btn">
                                <button class="btn btn-default" type="button">
                                    <i class="fa fa-search"></i>
                                </button>
                            </span>
                            </div>
                            <!-- /input-group -->
                        </li>
                        <li>
                            <a href="/monitor"><i class="fa fa-desktop fa-fw"></i> 主机详情</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> 自动监控<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="flot.html">查看监控</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-envelope-o fa-fw"></i> 短信平台<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="/message/usage">短信使用情况</a>
                                </li>
                                <li>
                                    <a href="/message/send">发送短信</a>
                                </li>
                                <li>
                                    <a href="/message/notify">上课通知</a>
                                </li>
                                <li>
                                    <a href="/message/log">查询短信日志</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-sitemap fa-fw"></i> 资产cmdb<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="/cmdb/add">添加资产</a>
                                </li>
                                <li>
                                    <a href="#">查看资产 <span class="fa arrow"></span></a>
                                    <ul class="nav nav-third-level">
                                        <li>
                                            <a href="/cmdb/list/room">机房列表</a>
                                        </li>
                                        <li>
                                            <a href="/cmdb/list/cabinet">机柜列表</a>
                                        </li>
                                        <li>
                                            <a href="/cmdb/list/host">主机列表</a>
                                        </li>
                                    </ul>
                                    <!-- /.nav-third-level -->
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-wrench fa-fw"></i> 自动化模块ops<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="/ops/online">应用上线</a>
                                </li>
                                <li>
                                    <a href="#">执行远程命令 <span class="fa arrow"></span></a>
                                    <ul class="nav nav-third-level">
                                        <li>
                                            <a href="/ops/remote">执行远程命令</a>
                                        </li>
                                        <li>
                                            <a href="#">批量执行远程命令</a>
                                        </li>
                                    </ul>
                                    <!-- /.nav-third-level -->
                                </li>
                                <li>
                                    <a href="#">上传文件 <span class="fa arrow"></span></a>
                                    <ul class="nav nav-third-level">
                                        <li>
                                            <a href="#">远程上传文件</a>
                                        </li>
                                        <li>
                                            <a href="#">批量远程上传文件</a>
                                        </li>
                                    </ul>
                                    <!-- /.nav-third-level -->
                                </li>
                                <li>
                                    <a href="flot.html">自动安装软件</a>
                                </li>
                                <li>
                                    <a href="flot.html">服务操作</a>
                                </li>

                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-user fa-fw"></i>用户信息<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="/user/info">审核用户</a>
                                </li>
                                <li>
                                    <a href="/user/edit">修改信息</a>
                                </li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>

        <!-- 页面画布开始 -->
        <div id="page-wrapper">
            <!-- 标题开始 -->
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">
                    {% block title %}
                    {% endblock %}
                    </h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- 标题开始 -->
            <!-- 一级子导航开始 -->
            <ol class="breadcrumb">
                <li class="active">
                    <i class="fa fa-dashboard"></i> <a href="/">首页</a>
                </li>
                <!-- 二级子导航开始 -->
                {% block nav %}
                {% endblock %}
                
               <!-- 二级子导航结束 -->
            </ol>
            <!-- 一级子导航结束 -->
            <hr>
            <!-- 正文开始 -->
            <div class="row">
                {% block content %}
                {% endblock %}
            </div>
            <!-- 正文结束 -->
        </div>
        <!-- 页面画布结束 -->

    </div>
    <!-- 画布结束 -->

    <!-- jQuery -->
    <script src="/static/js/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/static/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/static/js/metisMenu.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="/static/js/raphael.min.js"></script>
    <script src="/static/js/morris.min.js"></script>
    <script src="/static/js/morris-data.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="/static/js/sb-admin-2.js"></script>
    {% block js %}
    {% endblock %}

{% else %}
    <script language="javascript" type="text/javascript"> 
        window.location.href="/user/login"; 
    </script> 
{% endif %}
</body>

</html>